package com.ultra;

import java.io.File;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.os.Environment;
import android.widget.ScrollView;

public class LoginActivity extends Activity {
	private  String filePath;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_login);
		
		ScrollView loginForm = (ScrollView) findViewById(R.id.login_form);
		filePath=Environment.getExternalStorageDirectory().getPath()+"/ultraIMG/blue/bg/login_bg.png";

		   File mfile=new File(filePath);
		     if (mfile.exists()) {//�����ļ�����
		     Bitmap bm = BitmapFactory.decodeFile(filePath);
		     BitmapDrawable drawable = new BitmapDrawable(bm);
		     loginForm.setBackgroundDrawable(drawable);
		     }

//		ImageView iv = (ImageView) findViewById(R.id.image_test);
//		Bitmap bit = BitmapFactory.decodeFile("/sdcard/dcd/images/xinwen.gif");
//		iv.setImageBitmap(bit);
	}
}
